﻿using System;
using Adp.Common;
using Yqd.Models;

namespace Yqd.Core
{
    public class TaskLogService
    {

        public static int AddLog(long TaskID, string Content)
        {
            var ctx = Fn.GetService<YqdContext>();
            var model = new Yqd_TaskLog();
            model.TaskID = TaskID;
            model.Content = WxUser.LogonInfo.UnitName + "(" + WxUser.LogonInfo.Name + ")" + Content;//"市府办(何海生)"
            model.Instime = DateTime.Now;
            model.EmployeeCode = WxUser.LogonInfo.EmployeeCode;
            ctx.Yqd_TaskLog.Add(model);
            return ctx.SaveChanges();
        }
    }
}
